<template>
  <div class="detail">
      <img :src="musicDetail.coverImgUrl" alt="">
      <div>{{musicDetail.name}} </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      musicDetail:""
    }
  },
  mounted(){
    console.log(this.$route.params.id);
    var id = this.$route.params.id;
    this.$http(`http://47.108.197.28:3000/playlist/detail?id=${id}`).then(res=>{
      console.log(res.data.playlist);
      this.musicDetail = res.data.playlist;
    })
  }
}
</script>

<style>
.detail{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
}
 .detail>img{
   width: 500px;
   height: 500px;
 }
</style>